<template>
    <div id="Khh">
        <img :src="normalQRcode" style=" width: 4.5rem;height: 4.5rem;margin-top: 3.4rem;margin-left: 1.5rem;">
    </div>
</template>

<script>
  import share from "../share/share.js";
  import config from "../config/config.js";
  export default{
    data(){
      return{
        normalQRcode:''
      }
    },
    methods:{
      collection(){
        var that = this;
        var value=JSON.stringify({}),
          key=demo(value);
        axios.post('/home/index/QRcode',{
          value:value,
          key:key,
          ticket:this.ticket
        },config)
          .then(function(response) {
            this.normalQRcode = response.data.data.normalQRcode;
          }.bind(this))
          .catch(function (error) {
            console.log(error);
          });
      },
      shareInit(){
        var link="/home/khh/:1";
        var newLink=link.replace(/\//g,'*');
        var obj={
          title:'砍好货',
          desc:'砍好货微信公众号传送门',
          link:newLink,
        }
        share(obj);
      },
    },
    created(){
      this.collection();
      this.shareInit()
    }
  }
</script>

<style>

</style>